<%@page import="net.vinote.smart.platform.service.bean.AppItem"%>
<%@page import="net.vinote.smart.platform.comm.PlatformConst"%>
<%@page import="net.vinote.smart.platform.service.bean.AppInfo"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="/comm/begin.jsp"%>
<style>
#workbench {
	background-color: #ebeef1;
	width: 90%;
	margin: 0px auto;
}

#workbench div {
	list-style: none;
	display: inherit;
	float: left;
	width: 19%;
	height: 161px;
	cursor: pointer;
	background-color: #cce2fa;
	text-align: center;
	margin: 1px 1px
}

#workbench div:hover {
	background-color: #acd2f8
}

#workbench div>span {
	font-size: 15px;
	font-weight: bold;
	color: #828282;
	height: 100%;
	text-align: center;
	margin: 60px 0;
	display: block;
}

#workbench div>span:HOVER {
	color: #696969
}
</style>
<%
	String subject = request.getParameter("subject");
	List<AppInfo> appList = CurUser.getAppInfoBySubject(subject);
%>
<div id="workbench">
	<%
			for (AppInfo info : appList) {
					if (PlatformConst.YES.equals(info.getWorkBench())) {
		%>
	<div onclick="AWE.openTab('APP_<%=info.getAppID()%>','<%=info.getAppName()%>','<%=info.getUrl()%>')">
		<span><%=info.getAppName()%></span>
	</div>
	<%
			}
					for (AppItem item : CurUser.getAppItemByAppID(info
							.getAppID())) {
						if (PlatformConst.YES.equals(item.getWorkBench())) {
		%>
	<div
		onclick="<%="javascript".equals(item.getTriggerMode()) ? item.getUrl()
									: ("openTab".equals(item.getTriggerMode()) ? "AWE.openTab('"
											+ info.getAppID()
											+ item.getItemID()
											+ "','"
											+ item.getItemName()
											+ "','"
											+ item.getUrl()
											+ "')"
											: ("openPage".equals(item.getTriggerMode()) ? "DWControl.OpenComp('"
													+ item.getUrl()
													+ "')"
													: ""))%>">
		<span><%=item.getItemName()%></span>
	</div>
	<%
			}
					}
				}
		%>
</div>
<%@include file="/comm/end.jsp"%>
